<extend name="Public/base"/>

<block name="body">
	<div class="main-title">
		<h2>友情链接管理</h2>
	</div>

	<div class="cf">
		<a class="btn" href="{:U('add','pid='.$pid)}">新 增</a>
		<!--<a class="btn" href="javascript:;">删 除</a>-->
		<!--<button class="btn list_sort" url="{:U('sort',array('pid'=>I('get.pid',0)),'')}">排序</button>-->
	</div>

	<div class="data-table table-striped">
		<table>
			<thead>
				<tr>
					<th class="row-selected">
						<input class="checkbox check-all" type="checkbox">
					</th>
					<th>ID</th>
					<th>链接名称</th>
					<th>链接地址</th>
                    <!--<th>排序</th>-->
                    <th>链接状态</th>
                    <th>创建时间</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<notempty name="link">
				<volist name="link" id="link">
					<tr>
						<td><input class="ids row-selected" type="checkbox" name="" id="" value="{$link['id']}"> </td>
						<td>{$link.id}</td>
						<td><a href="{:U('index?id='.$link['id'])}">{$link.title}</a></td>
						<td>{$link.url}</td>
                        <td>{$link.status}</td>
                        <td>{$link.create_time}</td>
						<td>
							<a title="编辑" href="{:U('edit?id='.$link['id'].'&pid='.$pid)}">编辑</a>
							<a href="{:U('setStatus?ids='.$link['id'].'&status='.abs(1-$link['status']))}" class="ajax-get">{$link.status|show_status_op}</a>
							<a class="confirm ajax-get" title="删除" href="{:U('del?id='.$link['id'])}">删除</a>
						</td>
					</tr>
				</volist>
				<else/>
				<td colspan="6" class="text-center"> aOh! 暂时还没有内容! </td>
				</notempty>
			</tbody>
		</table>
	</div>
</block>
